package com.game.cards.spells;

import java.util.Scanner;

import com.game.cards.Flags;
import com.game.cards.MonsterCard;
import com.game.cards.SpellCard;
import com.game.play.Game;

public class PiercingStrikes extends SpellCard {
	public PiercingStrikes()
	{
		this.title = "Piercing Strikes";
		this.description = "Select one of your monsters. Increase that monsters ATK by 300 \n and it's attacks now go through defense.";
	}
	public void effect(Game game)
	{
		if (game.getCurrentTurn().getField().getMonsterCards().size() > 0) {
		System.out.println("Which Monster will you equip it to? (Type -1 to cancel)");
		int count = 0;
		for (MonsterCard mc : game.getCurrentTurn().getField().getMonsterCards())
		{
			System.out.println("(" + count + ")" + mc.getTitle());
		}
		Scanner scan = new Scanner(System.in);
		int input = scan.nextInt();
		if (input != -1) {
			MonsterCard mc = game.getCurrentTurn().getField().getMonsterCards().get(input);
			
			mc.setAttack(mc.getAttack() + 300);
			mc.getFlags().add(Flags.piercing);
			
			System.out.println(mc.getTitle() + " gained 300 ATK and has piercing!");
			this.deck.getOwner().getField().removeSpellTrapById(this.id);
			
		}
		
		}
	}

}
